aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/[username]/request/+page.svelte
blob: 173c2c05a9c390dd41dbd3889b97d59b601d4f3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<script>
	import { t } from '$lib/translations';
	import { enhance } from '$app/forms';
	import { Icon } from '$comp';
	import { back } from '$lib/utils';

	export let data;

	let { subject, user } = data;
</script>

<button class="ml-5 md:ml-20 mt-10 hover:opacity-80" on:click={back}>
	<Icon icon="arrow-left" style="w-10" />
</button>

<div class="container max-w-lg px-4 mx-auto mt-10 space-y-5">
	<h1 class="px-3 md:px-0 text-center text-3xl md:text-4xl font-semibold">
		{$t('payments.requestAnInvoice')}
	</h1>

	<form action="?/create" method="POST" use:enhance class="space-y-5">
		<input type="hidden" name="requester_id" value={user.id} />
		<input type="hidden" name="recipient" value={subject.username} />

		<textarea
			name="memo"
			placeholder={$t('payments.describeOrder')}
			class="w-full p-4 border rounded-xl h-48"
		/>

		<div class="w-full flex">
			<button
				type="submit"
				class="bg-black text-white border rounded-full px-6 py-2 font-bold mx-auto"
			>
				{$t('payments.submit')}
			</button>
		</div>
	</form>
</div>